<template>
	<el-form label-width="140px">
		<el-row :gutter="20">
			<el-col class="info-item" :md="8" :sm="12" :xs="24">
				<div class="info-item__title mb-2">到店信息</div>
				<el-form-item label="总到店次数：">{{ detail.to_shop || 0 }}次</el-form-item>
				<el-form-item label="最近到店时间：">{{ detail.last_shop || "-" }}</el-form-item>
				<el-form-item label="最近消费门店：">
					{{ last_shop_data.dept_name || "-" }}
				</el-form-item>
				<el-form-item label="最近消费项目：">
					{{ last_shop_data.projects || "-" }}
				</el-form-item>
				<el-form-item label="最近消费金额：">
					￥{{ last_shop_data.money || 0 }}
				</el-form-item>
				<el-form-item label="首次到店时间：">{{ detail.first_shop || "-" }}</el-form-item>
				<el-form-item label="首次消费门店：">
					{{ first_shop_data.dept_name || "-" }}
				</el-form-item>
				<el-form-item label="首次消费项目：">
					{{ first_shop_data.projects || "-" }}
				</el-form-item>
				<el-form-item label="首次消费金额：">
					￥{{ first_shop_data.money || 0 }}
				</el-form-item>
				<el-form-item label="首次下定时间：">
					{{ detail.first_deposit || "-" }}
				</el-form-item>
			</el-col>
			<el-col class="info-item" :md="8" :sm="12" :xs="24">
				<div class="info-item__title mb-2">创建信息</div>
				<el-form-item label="事业部：">{{ detail.biz_name || "-" }}</el-form-item>
				<el-form-item label="品牌：">{{ detail.bra_name || "-" }}</el-form-item>
				<el-form-item label="创建时间：">{{ detail.addtime || "-" }}</el-form-item>
				<el-form-item label="创建人：">{{ detail.name_add_op || "-" }}</el-form-item>
				<el-form-item label="创建人所属部门：">{{
					detail.name_add_dept || "-"
				}}</el-form-item>
				<el-form-item label="创建人所属分公司：">{{ detail.name_add_company || "-" }}</el-form-item>
				<el-form-item label="加微时间：">{{ detail.wechat_join_day || "-" }}</el-form-item>
				<el-form-item label="加好友方式：">
					{{ detail.id_join_type | constFilter("ADD_WX_TYPE") }}
				</el-form-item>
				<el-form-item label="广告账户:">{{ detail.adid || "-" }}</el-form-item>
				<el-form-item label="广告项目：">{{ detail.projectid || "-" }}</el-form-item>
				<el-form-item label="广告计划：">{{ detail.promotionid || "-" }}</el-form-item>
			</el-col>
			<el-col class="info-item" :md="8" :sm="12" :xs="24">
				<div class="info-item__title mb-2">归属信息</div>
				<el-form-item label="当前所属门店：">{{ detail.dept_name }}</el-form-item>
				<el-form-item label="当前归属人：">{{ detail.name_ascr_op }}</el-form-item>
				<el-form-item label="当前归属部门：">{{ detail.name_ascr_dept }}</el-form-item>
				<el-form-item label="当前归属分公司：">{{
					detail.name_ascr_company || "-"
				}}</el-form-item>
				<el-form-item label="原归属门店：">{{ detail.dept_name || "-" }}</el-form-item>
				<el-form-item label="原归属人：">{{ detail.name_add_op || "-" }}</el-form-item>
				<el-form-item label="原归属部门：">{{ detail.name_add_dept || "-" }}</el-form-item>
				<el-form-item label="原归属分公司：">{{
					detail.name_add_company || "-"
				}}</el-form-item>
				<el-form-item label="推广人：">{{ detail.promoter_name || "-" }}</el-form-item>
			</el-col>
		</el-row>
	</el-form>
</template>
<script>
	export default {
		props: {
			detail: {
				type: Object,
				default: () => ({})
			}
		},
		computed: {
			first_shop_data() {
				return this.detail.first_shop_data || {};
			},
			last_shop_data() {
				return this.detail.last_shop_data || {};
			}
		},
		methods: {
			init() {}
		},
		mounted() {
			console.log(this.detail, "=======");
		}
	};
</script>
<style lang="scss" scoped>
	::v-deep {
		.el-form-item {
			margin-bottom: 0;
		}
	}
	.info-item {
		&__title {
			position: relative;
			background: #f9fafc;
			height: 36px;
			line-height: 36px;
			padding-left: 20px;
			&::before {
				content: "";
				display: block;
				width: 4px;
				height: 22px;
				background: $primary;
				border-radius: 4px;
				position: absolute;
				top: 7px;
				left: 6px;
			}
		}
	}
</style>
